﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Adams.Web.Controllers
{
    public class FilesController : Controller
    {
        [AppendLayoutModel]
        public ActionResult Index(string url)
        {
            var model = Logic.Files.Index.PageLoad(url);

            if (model.File == null)
            {
                return HttpNotFound();
            }
            else
            {
                return File(model.File.Content, model.File.ContentType);
            }
        }
    }
}
